package com.rent.writeoff.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 租金计划表
 */
@Data
@TableName("rent_plan")
@ApiModel(value = "租金计划", description = "存储客户待收租金信息的实体类")
public class RentPlan {
    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键ID", example = "1")
    private Long id;

    /**
     * 承租人名称（关联付款账户名称）
     */
    @TableField("lessee_name")
    @ApiModelProperty(value = "承租人名称", example = "北京XX有限公司", required = true)
    private String lesseeName;

    /**
     * 应收日期
     */
    @TableField("due_date")
    @ApiModelProperty(value = "应收日期", example = "2025-10-01", required = true)
    private LocalDate dueDate;

    /**
     * 应收总金额（本金+利息）
     */
    @TableField("total_amount")
    @ApiModelProperty(value = "应收总金额", example = "12000.00", required = true)
    private BigDecimal totalAmount;

    /**
     * 应收本金
     */
    @TableField("principal")
    @ApiModelProperty(value = "应收本金", example = "10000.00", required = true)
    private BigDecimal principal;

    /**
     * 应收利息
     */
    @TableField("interest")
    @ApiModelProperty(value = "应收利息", example = "2000.00", required = true)
    private BigDecimal interest;

    /**
     * 实收本金
     */
    @TableField("received_principal")
    @ApiModelProperty(value = "实收本金", example = "5000.00")
    private BigDecimal receivedPrincipal;

    /**
     * 实收利息
     */
    @TableField("received_interest")
    @ApiModelProperty(value = "实收利息", example = "1000.00")
    private BigDecimal receivedInterest;

    /**
     * 核销状态（0-未核销，1-已核销，2-部分核销）
     */
    @TableField("write_off_status")
    @ApiModelProperty(value = "核销状态", notes = "0-未核销，1-已核销，2-部分核销", example = "0")
    private Integer writeOffStatus;

    /**
     * 记录创建时间
     */
    @TableField("create_time")
    @ApiModelProperty(value = "记录创建时间", example = "2025-09-01 00:00:00")
    private LocalDateTime createTime;
}
